import tkinter as tk
from tkinter import filedialog

def open_folder_dialog():
    root = tk.Tk()
    root.withdraw()
    folder_path = filedialog.askdirectory()
    return folder_path


def select_single_exe():
    root = tk.Tk()
    root.withdraw()
    file_path = filedialog.askopenfilename(initialdir="/", title="Select .exe file", filetypes=(("文件类型", "*.exe"), ("All files", "*.*")))
    
    return file_path

# 调用函数来打开文件夹选择窗口
# selected_folder = open_folder_dialog()
# print("选择的文件夹路径为：", selected_folder)